package com.draven.mall.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 骑手实体类
 */
@Data
@TableName("tb_rider")
public class Rider implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 骑手ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    private String realName;

    private String idCard;

    private String phone;

    private String avatar;

    private String username;

    private String password;

    private Integer status;
    
    /**
     * 抢单状态：0-关闭，1-开启
     */
    private Integer grabOrderStatus;

    /**
     * 骑手评分（0-5分）
     */
    private Float rating;

    /**
     * 已完成订单数量
     */
    private Integer completedOrderCount;

    private Integer vehicleType;

    private String vehicleNumber;

    private Integer workingStatus;

    private BigDecimal longitude;

    private BigDecimal latitude;

    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private Date createdTime;

    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;
}
